function [V_idct_Vec]=FunApp_StateReduction_iDCT(V_dct_Res,Ind_Res,Size,V_dct_Full)

%% Preliminaries
N_Dim       =   length(Size);
if N_Dim==1
    Size        =   [Size(1),1];
end
if ~isvector(V_dct_Res) || ~isvector(Ind_Res)
    error('Please input an vector');
end
if numel(V_dct_Res)~=numel(Ind_Res)
    error('Dimension is not consistent');
end

if nargin>3
    V_dct_Vec       =   V_dct_Full(:);
else
    V_dct_Vec       =   zeros(prod(Size),1);
end
V_dct_Vec(Ind_Res) ...
            =   V_dct_Res(:);
%% idct along Each Dimension
for ii=N_Dim:-1:1
    if ii==N_Dim
        V_idct_Mat  =   idct(reshape(V_dct_Vec,Size),[],ii);
    else
        V_idct_Mat  =   idct(V_idct_Mat,[],ii);
    end
end

V_idct_Vec  =   V_idct_Mat(:);